<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="UTF-8" />
    <title>x-tool 文档</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <!-- 设置浏览器图标 -->
    
    <link rel="icon" href="./img/ptg_icon.png" type="image/x-icon" />
    <link rel="shortcut icon" href="./img/ptg_icon.png" type="image/x-icon" />
    <meta name="description" content="Description" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    
    <!-- 默认主题 -->
    <link title="bai" rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css" />
    <link title="hei" rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/dark.css"/>
    <!-- element-ui 引入样式 -->
    <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" /> -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui@2.15.1/lib/theme-chalk/index.css" />
    <!-- 引入 CSS 文件 -->
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/vuep/dist/vuep.css">
    <style>
      .card {
        box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
        transition: 0.3s;
        width: 100%;
        border-radius: 5px;
        padding: 20px;
      }
      .card:hover {
        box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
      }
      iframe{
        border: none !important;
      }
      html,#app,body{
        /*  */
      }
    </style>
  </head>

  <body>
    <!-- 定义加载时候的动作 -->
    <div id="app">加载中...</div>
    <script>
      window.$docsify = {
        logo: "./img/ptg_logo.png",
        // 项目名称
        name: "x-tool",
        // 仓库地址，点击右上角的Github章鱼猫头像会跳转到此地址
        repo: "https://gitee.com/fhs1/x-tool",
        // 侧边栏支持，默认加载的是项目根目录下的_sidebar.md文件
        loadSidebar: true,
        // 导航栏支持，默认加载的是项目根目录下的_navbar.md文件
        loadNavbar: true,
        // 封面支持，默认加载的是项目根目录下的_coverpage.md文件
        coverpage: false,
        // 最大支持渲染的标题层级
        maxLevel: 4,
        // 自定义侧边栏后默认不会再生成目录，设置生成目录的最大层级，建议配置为1或者2
        subMaxLevel: 2,
        // 搜索配置
        search: {
          maxAge: 86400000,
          //paths: auto,
          placeholder: "搜索",
          noData: "找不到结果",
          depth: 4,
          hideOtherSidebarContent: false,
          // namespace: "x-tool"
        }
      };
    </script>

    <!-- import Vue before Element -->
    <!-- <script src="https://unpkg.com/vue/dist/vue.js"></script> -->
    <!-- 或引入压缩版文件 -->
    <script src="//cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
    
    <!-- element-ui import JavaScript -->
    <!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
    <script src="https://unpkg.com/element-ui@2.15.1/lib/index.js"></script>

    <!-- docsify的js依赖 -->
    <script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
    <!-- emoji表情支持 -->
    <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/emoji.min.js"></script>
    <!-- 图片放大缩小支持 -->
    <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.min.js"></script>
    <!-- 搜索功能支持 -->
    <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
    <!-- 语言解析功能加强 -->
    <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
    <!-- 加入了(Java、Python、json、plsql、SQL、JavaScript、go、yaml、powershell)的语言解析 -->
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-java.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-javascript.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-python.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-json.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-powershell.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-plsql.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-sql.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-go.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.21.0/components/prism-yaml.min.js"></script>
    <script>
      function isBai() {
        let hour = new Date().getHours()
        if (hour >= 20 || hour < 7){
          setStyleSheet('hei')
          return false;
        }
        setStyleSheet('bai')
        return true;
      }
      function setStyleSheet(title) {
        // 首先找到DOM中所有的link标签
        var link_list = document.getElementsByTagName("link");
        if (link_list) {
          for (var i = 0; i < link_list.length; i++) {
            // 要找到所有link中rel属性值包括style的，也就是包括stylesheet和alternate stylesheet;
            if (link_list[i].getAttribute("href").indexOf("//cdn.jsdelivr.net") != -1) {
              // 将符合条件的link的disabled的属性设为true，都改为禁用；
              link_list[i].disabled = true;
              // 然后判断link标签中的title属性，找到我们需要替换的css文件
              // 找到后将该link的disabled改为启用；
              if (link_list[i].getAttribute("title") === title) {
                link_list[i].disabled = false;
              }
            }
          }
        }
      }
    </script>
  </body>
</html>
